package com.zsj.endpoint;

import org.springframework.ws.server.endpoint.annotation.Endpoint;
import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
import org.springframework.ws.server.endpoint.annotation.RequestPayload;
import org.springframework.ws.server.endpoint.annotation.ResponsePayload;

import com.zsj.bean.User;

/**
 * spring web services的server端
 * 
 * @author Zsj
 * @date 2021/10/1
 *
 */
@Endpoint
public class UserEndpoint {

	@PayloadRoot(localPart = "user")
	@ResponsePayload
	public User handle(@RequestPayload User user) throws Exception {
		System.out.println(user);
		user.setId(10086);
		user.setName("Hello Spring!");
		return user;
	}

}
